package com.breakfast.fun.ui.user.order;

import com.breakfast.fun.base.BaseModel;
import com.breakfast.fun.base.BasePresenter;
import com.breakfast.fun.base.BaseView;
import com.breakfast.fun.data.entity.mall.MallOrderDetail;
import com.breakfast.fun.data.entity.user.Result;
import com.breakfast.fun.data.entity.user.recharge.PayBean;
import com.breakfast.fun.data.entity.user.recharge.RechargeMoney;

import java.util.Map;

import retrofit2.http.FieldMap;
import rx.Observable;

/**
 * Created by yukai on 16/10/5.
 */

public interface MallOrderDetailContract {
    interface Model extends BaseModel {
        Observable<MallOrderDetail> getOrderInfoModel(@FieldMap Map<String, String> map);

        Observable<RechargeMoney> getPayBeanModel(@FieldMap Map<String, String> map);

        Observable<Result> getOrderCancelModel(@FieldMap Map<String, String> map);

    }

    interface View extends BaseView {
        String getOrderId();

        void showOrder(MallOrderDetail orderDetail);

        void showCancelSuccess();

        void toPay(PayBean payBean);
    }

    abstract class Presenter extends BasePresenter<Model, View> {
        public abstract void getOrderInfo(String orderId);

        public abstract void cancelOrder();

        public abstract void getPayBean(String orderNo);
    }
}
